package com.ruoyi.system.service.evaluationService.evaluationServiceImpl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.evaluation.Evaluation;
import com.ruoyi.system.domain.evaluation.EvaluationEnity;
import com.ruoyi.system.domain.evaluation.Store;
import com.ruoyi.system.mapper.evaluation.EvaluationMapper;
import com.ruoyi.system.service.evaluationService.EvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EvaluationServiceImpl implements EvaluationService {
   @Autowired
   private EvaluationMapper evaluationMapper;
    @Override
    public List<Store> selectAllStore() {
        return evaluationMapper.selectAllStore();
    }

    @Override
    public List<Store> selectStoreByLocation_id(int location_id) {
        return evaluationMapper.selectStoreByLocation_id(location_id);
    }

    @Override
    public List<Evaluation> selectEvaluation() {
        return evaluationMapper.selectEvaluation();
    }

    @Override
    public List<EvaluationEnity> selectEvaluation2() {
        return evaluationMapper.selectEvaluation2();
    }
    //一键剔除异常数据
    @Override
    public int deleteEvaluationByScore() {
        return evaluationMapper.deleteEvaluationByScore();
    }
    //剔除选定的id的数据
    @Override
    public int deleteEvaluationById(String ids) {
        Long[] evaluationIds = Convert.toLongArray(ids);
        return evaluationMapper.deleteEvaluation(evaluationIds);
    }

    @Override
    public List<EvaluationEnity> selectEvaluationName() {
        return evaluationMapper.selectEvaluationName();
    }
}
